package com.iplant.wms.service.po.bill;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.wms.service.basicenum.bill.WMSBillModes;

import java.io.Serializable;

/**
 * 单据类型
 */

@DBBasePO(TableName ="wms_bill_type" ,CheckName = {"Code","Name"},
		Schemas = DBSchemas.WMS,CodeAuto = true,CodePrefix = "WBT-")
public class WMSBillType extends BasePO implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 1 采购订单 2 到货通知单  3 收货单
	 */
	@DBCondition
	@DBField
	public int TypeMode=0;

	public String TypeModeText="";


	@JsonProperty("TypeMode")
	public int getTypeMode() {
		return TypeMode;
	}

	public void setTypeMode(int typeMode) {
		TypeMode = typeMode;
	}
	@JsonProperty("TypeMode")
	public String getTypeModeText() {
		TypeModeText= WMSBillModes.getEnumType(TypeMode).getLabel();
		return TypeModeText;
	}

	public void setTypeModeText(String typeModeText) {
		TypeModeText = typeModeText;
	}
}
